package com.amado.course43awt;

import java.awt.*;
public class QQtain extends Frame
{
	QQtain(String name)
	{
		super(name);
		MenuBar mb = new MenuBar();
		Menu a = new Menu("聊天");
		Menu b = new Menu("娱乐");
		Menu c = new Menu("应用");
		Menu d = new Menu("工具");
		mb.add(a);
		mb.add(b);
		mb.add(c);
		mb.add(d);
		setMenuBar(mb);

		Panel pCenter = new Panel();
		Panel pCenterCenter = new Panel();
		Panel pRight = new Panel();
		Panel pRights = new Panel();
		Panel pRightCenter = new Panel();
		Panel pRightUp = new Panel();
		Panel pRightUps = new Panel();
		Panel pRightDown = new Panel();
		Panel pUp = new Panel();
		Panel pUps = new Panel();
		Panel pDown = new Panel();
		Panel pDownUp = new Panel();
		Panel pDownUps = new Panel();
		Panel pDownDown = new Panel();
		Panel pDownDowns = new Panel();
		Panel pDownCenter = new Panel();

		setLayout(new BorderLayout(5,3));
		add(pCenter,BorderLayout.CENTER);
		add(new Panel(),BorderLayout.WEST);
		add(pRights,BorderLayout.EAST);
		pCenter.setLayout(new BorderLayout());
		pCenter.add(pUps,BorderLayout.NORTH);
		pCenter.add(pCenterCenter,BorderLayout.CENTER);
		pCenter.add(pDown,BorderLayout.SOUTH);
		
		pUps.setLayout(new BorderLayout());
		pUps.add(new Panel(),BorderLayout.NORTH);
		pUps.add(pUp,BorderLayout.CENTER);
		pUp.setLayout(new GridLayout(2,1,1,1));
		pUp.add(new Label ("周要(392200728) : 真的爱很你哦"));
		pUp.add(new Label ("现在我努力学着放弃" ));
		pCenterCenter.setLayout(new GridLayout(1,1,20,80));
		pCenterCenter.add(new List(3,true));
		pDown.setLayout(new BorderLayout(1,5));
		pDown.add(pDownUps,BorderLayout.NORTH);
		pDown.add(pDownCenter,BorderLayout.CENTER);
		pDown.add(pDownDowns,BorderLayout.SOUTH);
		pDownUps.setLayout(new BorderLayout());
		pDownUps.add(new Panel(),BorderLayout.NORTH);
		pDownUps.add(pDownUp,BorderLayout.CENTER);
		pDownUp.setLayout(new GridLayout(1,10,10,0));
		pDownUp.add(new Button("A"));
		pDownUp.add(new Button("B"));
		pDownUp.add(new Button("C"));
		pDownUp.add(new Button("D"));
		pDownUp.add(new Button("E"));
		pDownUp.add(new Button("F"));
		pDownUp.add(new Button("G"));
		pDownUp.add(new Button("H"));
		pDownUp.add(new Button("I"));
		pDownCenter.setLayout(new GridLayout(1,5));
		pDownCenter.add(new TextArea(4,10));
		pDownDowns.setLayout(new BorderLayout());
		pDownDowns.add(pDownDown,BorderLayout.CENTER);
		pDownDowns.add(new Panel(),BorderLayout.SOUTH);
		pDownDown.setLayout(new GridLayout(1,5,4,1));
		pDownDown.add(new Button("聊天记录(H)"));
		pDownDown.add(new Button("消息模式(T)"));
		pDownDown.add(new Panel());
		pDownDown.add(new Button("关闭(C)"));
		pDownDown.add(new Button("发送(S)"));

		pRights.setLayout(new BorderLayout());
		pRights.add(new Panel(),BorderLayout.EAST);
		pRights.add(pRight,BorderLayout.CENTER);
		pRights.add(new Panel(),BorderLayout.SOUTH);
		pRight.setLayout(new BorderLayout(2,2));
		pRight.add(pRightUps,BorderLayout.NORTH);
		pRight.add(pRightCenter,BorderLayout.CENTER);
		pRightUps.setLayout(new BorderLayout());
		pRightUps.add(new Panel(),BorderLayout.NORTH);
		pRightUps.add(pRightUp,BorderLayout.CENTER);
		pRightUp.setLayout(new GridLayout(1,1));
		pRightUp.add(new Label("对方形象"));
		pRightCenter.setLayout(new GridLayout(3,1,1,9));
		pRightCenter.add(new List());
		Panel temp = new Panel();
		temp.setLayout(new GridLayout(5,1,1,1));
		temp.add(new Label("问 :  那里有SQL"));
		temp.add(new Label("答: wwww.greendown.com"));
		temp.add(new Label("www.crsky.commnvw.com"));
		temp.add(new Label("wwww.xowndc.com"));
		temp.add(new Label("                                         转载"));
		temp.setBackground(Color.WHITE);
		pRightCenter.add(temp);
		Panel temps = new Panel();
		pRightCenter.add(new List());
//		pRightCenter.add();
		pRightUp.setBackground(new Color(169,226,237));
		pUp.setBackground(new Color(184,240,241));
		setBackground(new Color(17,182,223));
		setBounds(250,150,500,500);
		show();
	}
	public static void main(String[] args) 
	{
		new QQtain("与周要  聊天中");
	}
}
